using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace ChronoNES
{
    public partial class frmChronoNES : Form
    {
        Emulator emulator;

        public frmChronoNES()
        {
            InitializeComponent();
        }

        private void frmChronoNES_Load(object sender, EventArgs e)
        {
            emulator = new Emulator();
            emulator.LoadROM(new FileStream("C:\\Development\\nestest.nes", FileMode.Open));
            emulator.Start();
        }

        private void fileLoad_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                emulator = new Emulator();
                emulator.LoadROM((FileStream)openFileDialog.OpenFile());
            }
        }

        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
        {

        }
    }
}